package com.mmche.web.dao;


import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Repository;

import com.mmche.base.dao.OnlineContentDao;
import com.mmche.base.dao.impl.OnlineContentDaoImpl;
import com.mmche.base.pojo.OnlineContent;

@Repository("webOnlineContentDao")
public class WebOnlineContentDao extends OnlineContentDaoImpl implements OnlineContentDao{

	@Override
	public OnlineContent findById(String id) {
		Query query = new Query();
		query.addCriteria(Criteria.where("id").is(id));
		query.fields().exclude("updateMan");
		query.fields().exclude("publishMan");
		return this.getMongoTemplate().findOne(query, OnlineContent.class);
	}
	
}
